package com.videoweb.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author lmr
 * @since 2025-05-17
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("menu")
public class Menu implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField(value = "`name`")
    /**
     * 菜单名称
     */
    private String name;

    /**
     * 父菜单ID
     */
    private Long parentId;

    /**
     *
     * 排序
     */
    @TableField(value = "`order`")

    private Integer order;

    /**
     * 类型(M:目录 C:菜单 F:按钮)
     */
    private String type;

    /**
     * 权限标识
     */
    private String perms;

    /**
     * 路由地址
     */
    private String path;

    /**
     * 组件路径
     */
    private String component;

    /**
     * 图标
     */
    private String icon;

    /**
     * 是否显示默认1显示  0隐藏
     */
    private Integer visible;

    /**
     * 是否外链
     */
    private Integer isFrame;

    private LocalDateTime createdAt;

    private LocalDateTime updatedAt;

    /**
     * 描述
     */
    private String description;


    @TableField(value = "`status`")

    /** 菜单状态（1正常 0停用） */
    private String status;




    /** 子菜单 */
    @TableField(exist = false)
    private List<Menu> children = new ArrayList<Menu>();



}
